//
//  LSNewFeatureViewController.m
//  KuaiYi
//
//  Created by ZengFanSheng on 2016/11/13.
//  Copyright © 2016年 HeiMa. All rights reserved.
//

#import "LSNewFeatureViewController.h"
#import "LSNewFeatureView.h"
@interface LSNewFeatureViewController ()

@end

@implementation LSNewFeatureViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    [self showNewFeature];
}
//显示新特性界面
-(void)showNewFeature{
    //创建新特性视图
    LSNewFeatureView *nfView = [[LSNewFeatureView alloc]initWithFrame:self.view.bounds];
    //把获得的图片数组赋值给视图的图片数组
    nfView.images = [self getNewFeatureImages];
    //把新特性视图添加到父容器
    [self.view addSubview:nfView];
}
//获取新特性界面图片数组的主方法
-(NSArray *)getNewFeatureImages{
    int count = 4;
    NSMutableArray *arrayM = [NSMutableArray array];
    for (int i = 0;i < count; i++) {
        //拼接图片名
        NSString *imgName = [@"newfeature_image" stringByAppendingFormat:@"0%d",i+1];
        //创建图片
        UIImage *image = [UIImage imageNamed:imgName];
        //把图片循环添加到数组
        [arrayM addObject:image];
    }
    return arrayM;
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

@end
